//
//  PlanDetailViewModel.m
//  Water
//
//  Created by chenguibang on 2017/11/27.
//  Copyright © 2017年 chenguibang. All rights reserved.
//

#import "PlanDetailViewModel.h"

@implementation PlanDetailViewModel
- (void)setDefultMenus{
    NSMutableArray *menus1 = [[NSMutableArray alloc]init];
    
    [menus1 addObject:@{@"title":@"标签",@"value":self.plan.tag ? self.plan.tag : @""}];
    [menus1 addObject:@{@"title":@"铃声",@"value":self.plan.notification.ring ? [self.plan.notification.ring stringByDeletingPathExtension] : @""}];
    [menus1 addObject:@{@"title":@"水票",@"value":self.plan.notification.ring ? @"暂无": @"暂无"}];
    [self.menus addObject:menus1];
    [self.refresh sendNext:nil];
    
}

- (void)resetMenus{
    [self.menus removeAllObjects];
    [self setDefultMenus];
}

- (RACSubject *)refresh{
    if (!_refresh) {
        _refresh = [RACSubject subject];
    }
    return _refresh;
}



- (NSMutableArray *)menus{
    if (!_menus) {
        _menus = [[NSMutableArray alloc]init];
    }
    return _menus;
}

@end
